home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
os2
/
dfs236s.zip
/
DFSINFO.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-07-06
|
3KB
|
105 lines
/* Analyse current status of all physical disks, JvW 21-01-97 */
/* partition tables and partition format information */
/* Then, for all HPFS partitions, show basic information */
/* and find the Root-directory and Codepage info without */
/* using the superblock or spareblock pointers */
/* All results will be contained in the logfile DFSINFO.TXT */
Parse Source with . myself .
Parse Arg logname
if logname = '' then
do
logname = 'dfsinfo.txt'
end
if Address() <> 'DFS' then
do
Address cmd '@dfs runq' myself logname
end; else
do
Address cmd '@del' logname
'@log' logname
say date('E') time()': Gathering diagnostic information; Please wait ...'
say ''
'close' /* release physical disks */
say 'First get the standard available stuff ...'
'fdisk /query'
'setboot /query'
say "And when available, Doug's partition overview too!"
'chkpart'
say 'Now use our own built-in diagnostic power ...'
'disk 0'
physdisks = rc /* get number of disks */
do i=1 to physdisks
Say ''
Say 'MBR/EBR chain for disk nr' i
'walk' i /* select next disk and show */
end /* it's MBR/EBR chain */
'part +' /* show all partition info */
partitions = rc /* and remember the count */
do i=1 to partitions
'part' i /* select next partition */
Say ''
Say 'Working on partition' i '=' dfs_drive 'on disk' dfs_disknr
if substr(dfs_drive,2,1) = ':' then
do
Say ''
Say 'Running CHKDSK on the partition ...'
'chkdsk' dfs_drive
Say ''
Say 'Attempt a normal directory of its root directory'
'dir' dfs_drive'\'
end
Say ''
if dfs_afsys = 'HPFS' then
do
if substr(dfs_drive,2,1) = ':' then
do
Say "Running Doug's HVA if available ..."
'hva -e -r -s' dfs_drive'\*'
end
Say ''
Say 'Running some DFS HPFS diagnostics ...'
't H'
' '
' '
' '
'11'
't H'
' '
' '
'0'
'findroot'
' '
' '
' '
'0'
'f c'
' '
'm'
'a'
end; else
do
Say 'No specific diagnostics for filesystem' dfs_afsys '(yet).'
't H'
end
end
say date('E') time()': Gathering diagnostic information finished.'
'@log' /* close the log file */
end
exit 0